#ifndef _DDMCMC_MEANSHIFT
#define _DDMCMC_MEANSHIFT

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

using namespace cv;

//#define Lightness		(1<<3)
//#define Ustar   		(1<<4)
//#define Vstar   		(1<<5)

class DDMCMC_MeanShiftClustering {
public:
	// constructor and destructor
	DDMCMC_MeanShiftClustering(Mat mOriginalImg);
	~DDMCMC_MeanShiftClustering();

	void meanShiftSegmentation(int nOption);
	void meanShiftClustering(Rect rRects[], int nRectCount, int nOption);
	void meanShiftInitialization(int &active_gen_contor);

// From mcSegMs.cpp
private:
	void init_matr();
	void init_neigh();

private:
	Mat mImg;
	int rows, cols, pxCount;

// From mcSegMs.h
private:
	int		_rg_rows, _rg_colms;	// width, height dimensions of the region
	int		_rg_cnt;				// number of data points (per channel)
	int		_max_sub_samp;			// maximum number of subsamples
	int*    _remn_cnt_map;			//the map of remaining points
	uchar*  _labels;				//labels, the class that every pixel belong to
	int		_remn_cnt;				//# of remaining points

	int my_neigh[8];
	static int my_neigh_r[8];

// From mcRasterColor.h
private:
	int			_k;				// parameter space dimension
	//int          _n_colors;      //# of colors
	//int*        _m_colors;      //how many of each color
	int*        _col_remain;    //the map of remaining colors
	int*        _m_col_remain;  //table of remaining colors
	int         _n_col_remain;  //# of remaining colors


};


#endif